package com.superteam.zzl.retrofit.DynamicFragment.custom;

import java.io.IOException;

import okhttp3.HttpUrl;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

/**
 * Created by Administrator on 2017/1/14.
 */

public class InfoInterceptor implements Interceptor {

    @Override
    public Response intercept(Chain chain) throws IOException {
        Request request = chain.request();
        HttpUrl httpUrl = request.url().newBuilder()
                .addQueryParameter("client_name", "QGLMain")
                .addQueryParameter("client_version", "6.0.3")
                .addQueryParameter("os_version", "22")
                .addQueryParameter("platform", "android")
                .addQueryParameter("screen_size", "1080x1920")
                .addQueryParameter("uuid", "868502020406316")
                .build();
        request = request.newBuilder().url(httpUrl).build();
        return chain.proceed(request);
    }
}
